package com.yzd.learnjava.concurrency;

import java.util.concurrent.TimeUnit;

import com.yzd.learnjava.util.Print;

public class DaemonDontRunFinally {
	public static void main(String[] args) {
		Thread t = new Thread(new ADaemon());
		t.setDaemon(true);
		t.start();
	}
}

class ADaemon implements Runnable{
	public void run() {
		try {
			Print.print("Starting ADaemon");
			TimeUnit.SECONDS.sleep(1);
		} catch (InterruptedException e) {
			Print.print("Exeting via InteruptedException");
		} finally {
			Print.print("This should always run?");
		}
	}
}
